<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<style>
		#demo {
		  font-size: 6em;
		  background: #4285f4;
		  color: white;
		  margin-bottom: 20px;
		}
		</style>
		
		
	</head>
	<body>
		<h2> JavaScript可以隐藏和显示HTML元素</h2>
		<div id="demo">HelloWord!</div>
		
		<button onclick="hide()">隐藏</button>
		<button onclick="show()">显示</button>
		
		<script>
			function hide() {
			  document.getElementById("demo").style.display = "none";
			}
			
			function show() {
			  document.getElementById("demo").style.display = "block";
			}
		</script>
	</body>
</html>